import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import My from '../views/My'
import Register from '../views/Register'
import Login from '../views/Login'
import FindPass from '../views/FindPass'
import Course from '../views/Course'
import UserDetail from '../views/UserDetail'
import UserSign from '../views/UserSign'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView,
    meta:{
      footShow: true
    }
  },{
    path: '/usersign',
    name: 'usersign',
    component: UserSign,
    meta:{
      footShow: true
    }
  },{
    path: '/userdetail',
    name: 'userdetail',
    component: UserDetail,
    meta:{
      footShow: true
    }
  },
  {
    path: '/course',
    name: 'course',
    component: Course,
    meta:{
      footShow: true
    }
  },{
    path: '/my',
    name: 'my',
    component: My,
    meta:{
      footShow: true
    }
  },{
    path: '/register',
    name: 'register',
    component: Register,
    meta:{
      footShow: false
    }
  },{
    path: '/login',
    name: 'login',
    component: Login,
    meta:{
      footShow: false
    }
  },{
    path: '/findpass',
    name: 'findpass',
    component: FindPass,
    meta:{
      footShow: false
    }
  },
  {
    path: '/about',
    name: 'about',
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
